//******************************************************************************
// TITLE:                      	Overloading Operators 
// FILENAME:                   	vector.h
// PREPARED FOR:               	CS215 Section CS13-02
// PROGRAMMER(S):              	Eric (Fox) Crowell
// DEVELOPMENT DATE:           	< 12/02/13 >
// COMPILER USED:      			Microsoft Visual Studio Ultimate 2013
// TARGET PLATFORM:         	Windows 8 x64
//================================================================

#ifndef VECTOR_H
#define VECTOR_H

#include <ostream>;
using namespace std;

class Vector {

public:
	Vector(); // Default Constructor (initializes with hard-coded values).
	Vector(double x, double y, double z); // A constructor that takes arguments for the vector x, y and, z values.

	void setX(double value); // "x" data member setter
	void setY(double value); // "y" data member setter
	void setZ(double value); // "z" data member setter

	double getX() const; // get "x" data member
	double getY() const; // get "y" data member
	double getZ() const; // get "z" data member

	double magnitude() const; // Returns the magnitude of this vector

	/* --- Multiplication --- */
	double operator*(const Vector &v) const; // double = Vector * Vector
	Vector operator*(const double &s) const; // Vector = Vector * double
	friend Vector operator*(const double &s, const Vector &v); // Vector = double * Vector

	/* --- Addition --- */
	Vector operator+(const Vector &v) const; // Vector = Vector + Vector
	Vector operator+(const double &s) const; // Vector = Vector + double
	friend Vector operator+(const double &s, const Vector &v); // Vector = double + Vector

	/* --- Subtraction --- */
	Vector operator-(const Vector &v) const; // Vector = Vector - Vector
	Vector operator-(const double &s) const; // Vector = Vector - double
	friend Vector operator-(const double &s, const Vector &v); // Vector = double - Vector

	/* Negation */
	Vector & operator-(); // Vector = -Vector

	/* --- Division --- */
	Vector operator/(const double &s) const; // Vector = Vector / double

	/* --- Cross Product --- */
	Vector operator^(const Vector &v) const; // Vector = Vector ^ Vector

	/* --- Equality --- */
	bool operator==(const Vector &v) const; // bool = Vector == Vector

	/* --- Less-Than --- */
	bool operator<(const Vector &v) const; // bool = Vector == Vector

	friend ostream& operator<<(ostream &out, const Vector &v);

private:
	double x; // x-coord
	double y; // y-coord
	double z; // z-coord

};

#endif